package com.wigem.approve.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wigem.framework.common.util.common.GuidUtils;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 楼宇政策申报对象 daq_policy
 *
 * @author DH
 * @date 2024-05-27
 */

@Data
@ApiModel
@TableName("daq_policy")
public class DaqPolicyEntity {

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ApiModelProperty(value = "", name = "id")
    @TableId
    private String id;

    /**
     * 楼宇id
     */
    @ApiModelProperty(value = "楼宇id", name = "estateId")
    @TableField(value = "estate_id")
    private String estateId;

    /**
     * 楼宇名称
     */
    @ApiModelProperty(value = "楼宇名称", name = "estateName")
    @TableField(value = "estate_name")
    private String estateName;

    /**
     * 报告期id
     */
    @ApiModelProperty(value = "报告期id", name = "reportId")
    @TableField(value = "report_id")
    private String reportId;

    /**
     * 报告期年份
     */
    @ApiModelProperty(value = "报告期年份", name = "reportYear")
    @TableField(value = "report_year")
    private String reportYear;

    /**
     * 街乡id
     */
    @ApiModelProperty(value = "街乡id", name = "regionId")
    @TableField(value = "region_id")
    private String regionId;

    /**
     * 街乡名称
     */
    @ApiModelProperty(value = "街乡名称", name = "regionName")
    @TableField(value = "region_name")
    private String regionName;

    /**
     * 填表人
     */
    @ApiModelProperty(value = "填表人", name = "fillPerson")
    @TableField(value = "fill_person")
    private String fillPerson;

    /**
     * 填报人联系电话
     */
    @ApiModelProperty(value = "填报人联系电话", name = "fillPhone")
    @TableField(value = "fill_phone")
    private String fillPhone;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人", name = "createUser")
    @TableField(value = "create_user")
    private String createUser;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", name = "createTime")
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人", name = "updateUser")
    @TableField(value = "update_user")
    private String updateUser;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间", name = "updateTime")
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;

    /**
     * 提交人
     */
    @ApiModelProperty(value = "提交人", name = "submitUser")
    @TableField(value = "submit_user")
    private String submitUser;

    /**
     * 提交时间
     */
    @ApiModelProperty(value = "提交时间", name = "submitTime")
    @TableField(value = "submit_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date submitTime;

    /**
     * 初审状态
     */
    @ApiModelProperty(value = "审批状态", name = "approveId")
    @TableField(value = "approve_id")
    private String approveId;

    /**
     * 申报类型
     */
    @ApiModelProperty(value = "申报类型", name = "policyType")
    @TableField(value = "policy_type")
    private String policyType;

    /**
     * 删除标记
     */
    @ApiModelProperty(value = "删除标记", name = "removeMark")
    @TableField(value = "remove_mark")
    private String removeMark;

    /**
     * 删除标记
     */
    @ApiModelProperty(value = "承诺书", name = "commitmenLetter")
    @TableField(value = "commitmen_letter")
    private String commitmenLetter;

    public void create() {
        this.id = GuidUtils.generate();
    }

    public void modify(String keyValue) {
        this.id = keyValue;
    }

}
